package wql.aaa.controller;

import com.aaa.entity.TbArticle;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import wql.aaa.service.TbArticleService;

import javax.management.relation.RelationSupport;

/**
 * @author wql
 * @version 1.0
 * @date 2023/3/1 11:34
 */
@RestController
@RequestMapping("/home/article")
public class TbArticalController {

    @Autowired
    private TbArticleService tbArticleService;

    @PostMapping("/getArticleByNavId/{navId}")
    public Result getArtical(@PathVariable String navId){
      return   tbArticleService.getArtical(navId);
    }

    @PostMapping("/updateArticleByNavId")
    public Result updateArtical( @RequestBody TbArticle tbArticle){
        return   tbArticleService.updateArtical(tbArticle);
    }
}
